package com.qf.fcy.youshare;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.RelativeLayout;

/**
 * Created with IntelliJ IDEA.
 * User: Alex[FR]
 * Date: 2015/2/5
 * Email: alex_fcy@163.com
 */
public class SettingActivity extends Activity {

    private CheckBox chkb;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_setting);

        chkb = (CheckBox) findViewById(R.id.ckb_push);

    }

    public void onCardClick(View view) {
        switch (view.getId()) {
            case R.id.layout_push:
                boolean isChecked = chkb.isChecked();
                if (isChecked) {
                    chkb.setText("是");
                }else {
                    chkb.setText("否");
                }
                chkb.setChecked(!isChecked);
        }
    }

}